﻿using System;
using System.Collections.Generic;
using System.IO;
using System.IO.IsolatedStorage;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
using TestMatrix.Model;

namespace TestMatrix.Helper
{
    public class PhoneHelper
    {
        public static IsolatedStorageSettings AppSetting = IsolatedStorageSettings.ApplicationSettings;

        public static string GetAppSettingValue(string key)
        {
            if (string.IsNullOrWhiteSpace(key))
                return null;

            bool isHaveKey = AppSetting.Contains(key);

            if (isHaveKey == false)
                return null;

            if (AppSetting[key] == null)
                return null;

            try
            {
                string value = AppSetting[key].ToString();

                return value;
            }
            catch
            {
                return null;
            }
        }
    }
}
